home *** CD-ROM | disk | FTP | other *** search
- #define FALSE 0
- #define TRUE 1
-
- #define BASE_RES_ID 400
- #define NIL 0L
- #define MOVE_TO_FRONT -1L
- #define REMOVE_ALL_EVENTS 0
-
- #define SLEEP 0L
- #define NIL_MOUSE_REGION 0L
- #define WNE_TRAP_NUM 0x60
- #define UNIMPL_TRAP_NUM 0x9f
-
- #define BANNER_OFFSET 96
- #define HORIZONTAL_OFFSET 0
- #define INITIAL_ROW 24
- #define LEFT_MARGIN 10
- #define ROW_HEIGHT 15
- #define START_ROW 0
-
- #define TEXT_FONT_SIZE 10 /* in pixels */
- #define GRAD_FONT_SIZE 6
-
- #define APPLE_MENU_ID BASE_RES_ID
- #define FILE_MENU_ID BASE_RES_ID+1
- #define EDIT_MENU_ID BASE_RES_ID+2
- #define OPTION_MENU_ID BASE_RES_ID+3
-
- #define TRANSFER_ITEM 1
- #define QUIT_ITEM 3
- #define ABOUT_ITEM 1
- #define COPY_ITEM 4
- #define PASTE_ITEM 5
- #define CLEAR_ITEM 6
- #define CLIPBOARD_ITEM 7
- #define SIMULATE_ITEM 1
- #define PLOT_ITEM 2
- #define STATUS_ITEM 3
-
- #define ABOUT_ALERT 400
- #define LAUNCH_ALERT 401
- #define FREE_MEM_ALERT 402
- #define ENOUGH_ALERT 403
- #define ERR_ALERT 404
- #define HOSED_FILE_ALERT 405
- #define CLIPBOARD_ALERT 406
- #define EMPTY_ALERT 407
- #define PROCESS_ALERT 409
- #define X_ALERT 410
- #define Y_ALERT 411
-
- /* default resource IDs for editable text */
-
- #define DEF_FRICTION_ID 401
- #define DEF_AMPLITUDE_ID 402
- #define DEF_ELASTIC_ID 403
- #define DEF_START_ID 404
- #define DEF_FINI_ID 405
- #define DEF_X_AXIS_ID 406
- #define DEF_Y_AXIS_ID 407
- #define DEF_MASS_ID 408
- #define DEF_INC_ID 409
- #define DEF_SIM_ID 410
-
- /* DITL item numbers */
-
- #define FRICTION_VALUE 4
- #define AMPLITUDE_VALUE 6
- #define ELASTIC_VALUE 8
- #define START_VALUE 10
- #define FINI_VALUE 12
- #define X_VALUE 14
- #define Y_VALUE 16
- #define MASS_VALUE 18
- #define INC_VALUE 20
- #define SIM_NAME_VALUE 22
-
- #define DRAG_THRESHOLD 30
-
- #define OK_BUTTON 1 /* dailog list items */
- #define CANCEL_BUTTON 2
-
- #define ON TRUE
- #define OFF FALSE
-
- #define FLOAT_CONST 4 /* floating pt numbers take up 4 bytes */
-
- #define WATCH_ICON 4
-
- #define WINDOW_HOME_LEFT 45 /* global coords */
- #define WINDOW_HOME_RIGHT 45
- #define NEW_WINDOW_OFFSET 20
- #define LEAVE_WHERE_IT_IS FALSE
-
- #define MinusOne 0xFFFF
-
- #define MIN 0
- #define MAX 32767
-
- /* have to be changed if graph does */
-
- #define GRAD_X_DELTA 36 /* gradient delta on x axis */
- #define GRAD_Y_DELTA 25 /* gradient delta on y axis */
- #define GRAPH_X_DELTA 367
- #define GRAPH_Y_DELTA 204
- #define GRAPH_X_OFFSET 40 /* offset from right of window */
- #define GRAPH_Y_OFFSET 244 /* offset from top of window */
-
-
- /************* globals ***************/
-
- typedef struct
- {
- StringPtr pfName; /* ptr to the name of launchee */
- short int param;
- char LC[2]; /* extended params: */
- long int extBlockLen; /* number of bytes in extension == 6 */
- short int fFlags; /* finder file info flags */
- long int launchFlags; /* bits 30, & 31 equal 1 for sublaunch */
- } LaunchStruct, *pLaunchStruct;
-
- /* used by dialog input routines */
-
- typedef struct
- {
- Str255 frict,
- amp,
- elastic,
- start,
- fini,
- xVal,
- yVal,
- mass,
- ink,
- simName;
- } SavedSettings, *SavedSettingsPtr;
-
- typedef struct
- {
- int length; /* coord pair length */
- float *xPtr; /* ptr to list of x values */
- float *yPtr; /* ptr to list of y values */
- } xyCoords, *xyCoordsPtr;
-
-
-